package br.com.membros.factory;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import br.com.membros.factory.interfaces.IFactoryDistribution;

public class MembrosMain {

	private static final String SERVICE_CONTEXT = "/ctx-membros-service.xml";
	private static final String BUSINESS_CONTEXT = "/ctx-membros-business.xml";
	private static final String FACTORY_CONTEXT = "/ctx-membros-factory.xml";
	private static final String DATABASE_CONTEXT = "/ctx-membros-database.xml";
	
	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext(BUSINESS_CONTEXT, 
																		DATABASE_CONTEXT, 
																		FACTORY_CONTEXT, 
																		SERVICE_CONTEXT);
	 	IFactoryDistribution factoryDistribution = context.getBean(IFactoryDistribution.class);
	 	factoryDistribution.startApplication();
		
	}
	
}
